<?php 
/**
* Kunena Login Module for Joomla 1.5.x and Kunena forum 1.5.x +
*
* @version 1.5.1 stable
* @copyright (C) 2009 @quila
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/

// no direct access
defined('_JEXEC') or die('Restricted access');
?>
<?php if(JPluginHelper::isEnabled('authentication', 'openid')) :
                $lang->load( 'plg_authentication_openid', JPATH_ADMINISTRATOR );
                $langScript =         'var JLanguage = {};'.
                                                ' JLanguage.WHAT_IS_OPENID = \''.JText::_( 'WHAT_IS_OPENID' ).'\';'.
                                                ' JLanguage.LOGIN_WITH_OPENID = \''.JText::_( 'LOGIN_WITH_OPENID' ).'\';'.
                                                ' JLanguage.NORMAL_LOGIN = \''.JText::_( 'NORMAL_LOGIN' ).'\';'.
                                                ' var modlogin = 1;';
                $document = &JFactory::getDocument();
                $document->addScriptDeclaration( $langScript );
                JHTML::_('script', 'openid.js');
endif; ?>
<form action="<?php echo JRoute::_( 'index.php', true, $params->get('usesecure')); ?>" method="post" name="login" id="form-login" >
<table width="100%" cellspacing="1">
        <tbody>
                <tr>
                        <td width="50%" class="fb_forum-pathway">
                <p class="genmed"><?php echo JText::_('Login message kunena'); ?></p>
                <p align="center">
                                <a href="<?php echo $ruleslink  ?>"><?php echo JText::_('Rules') ?></a>
                                &nbsp;&nbsp;|&nbsp;&nbsp;
                                <a href="<?php echo $helplink  ?>"><?php echo JText::_('Help') ?></a>
                </p>
                        </td>
                        <td class="fb_forum-pathway">
                                <table cellspacing="1" cellpadding="4" align="center" style="width: 100%;">
                                        <tbody>
                                                <tr>
                                                        <td valign="top"><b><?php echo JText::_('Username') ?></b></td>
                                                        <td><input type="text" name="username" class="k_inputbox" alt="username" size="30" />
                                                                <br/>
                                                                <span class="k_link">
                                                                <a href="<?php echo $forgot_username_link; ?>">
                                                                <?php echo JText::_('FORGOT_YOUR_USERNAME'); ?></a>
                                                                </span>
                                                        </td>
                                                </tr>
                                                <tr>
                                                        <td valign="top"><b><?php echo JText::_('Password') ?></b></td>
                                                        <td>
                                                                <input type="password" name="passwd" class="k_inputbox" size="30" alt="password" />
                                                                <br/>
                                                                <span class="k_link">
                                                                <a href="<?php echo $forgot_password_link; ?>">
                                                                <?php echo JText::_('FORGOT_YOUR_PASSWORD'); ?></a>
                                                                </span>
                                                        </td>
                                                </tr>
                                                <?php if(JPluginHelper::isEnabled('system', 'remember')) : ?>
                                                <tr>
                                                        <td>
                                                        </td>
                                                        <td><input type="checkbox" name="remember" value="yes" alt="Remember Me" /> <span><?php echo JText::_('Remember me') ?></span></td>
                                                </tr>
                                                <?php endif; ?>
                                                <tr>
                                                        <td></td>
                                                        <td>
                                                                <?php
                                                                $usersConfig = &JComponentHelper::getParams( 'com_users' );
                                                                if ($usersConfig->get('allowUserRegistration')) : ?>
                                                                <span class="k_link">
                                                                <a href="<?php echo $register_link; ?>">
                                                                <?php echo JText::_('REGISTER'); ?></a>
                                                                </span>
                                                                <?php endif; ?>
                                                        </td>
                                                </tr>
                                        </tbody>
                                </table>
                        </td>
                </tr>
                <tr>
                        <td align="center" colspan="2" class="fb_forum-pathway" style="text-align:center!important;">
                                <input type="submit" name="Submit" class="fb_button" value="<?php echo JText::_('LOGIN') ?>" />
                                <input type="hidden" name="option" value="com_user" />
                                <input type="hidden" name="task" value="login" />
                                <input type="hidden" name="return" value="<?php echo $return; ?>" />
                                <?php echo JHTML::_( 'form.token' ); ?>
                        </td>
                </tr>
        </tbody>
</table>
</form>
